package cn.wolfcode.crm.query;

import cn.wolfcode.crm.util.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Setter@Getter
public class ChartQueryObject extends QueryObject {
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date beginDate;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date endDate;

    private String groupType = "e.name"; //分组类型

    //处理到当天的最后1S
    public Date getEndDate() {
        return DateUtil.getEndDate(endDate);
    }
}
